package 牛客网_N.动态规划.climbing_stairs_5;

import java.util.Scanner;
/**
 * 自上而下的动态规划 爬楼梯
 * @author x
 * @summary
 */
public class Main2 {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();	
		System.out.println(climbStairs(n));
	}
	
	public static int climbStairs(int n){
		int[] A = new int[n+2];
		A[1] = 1;
		A[2] = 2;
		for(int i = 3; i < n+1; i++){
			A[i] = A[i-1]+A[i-2];
		}
		return A[n];
	}
}
